<?php

/**
 * AbetProjectDate form base class.
 *
 * @method AbetProjectDate getObject() Returns the current form's model object
 *
 * @package    sfproject
 * @subpackage form
 * @author     Your name here
 */
abstract class BaseAbetProjectDateForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'admin_id'   => new sfWidgetFormInputHidden(),
      'date_code'  => new sfWidgetFormInputHidden(),
      'start_date' => new sfWidgetFormDate(),
      'end_date'   => new sfWidgetFormDate(),
      'created_at' => new sfWidgetFormDateTime(),
      'updated_at' => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'admin_id'   => new sfValidatorPropelChoice(array('model' => 'AbetInstructor', 'column' => 'ins_code', 'required' => false)),
      'date_code'  => new sfValidatorChoice(array('choices' => array($this->getObject()->getDateCode()), 'empty_value' => $this->getObject()->getDateCode(), 'required' => false)),
      'start_date' => new sfValidatorDate(),
      'end_date'   => new sfValidatorDate(),
      'created_at' => new sfValidatorDateTime(array('required' => false)),
      'updated_at' => new sfValidatorDateTime(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('abet_project_date[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'AbetProjectDate';
  }


}
